﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SceneController : MonoBehaviour
{
	[SerializeField] private GameObject enemyPrefeb;
	private GameObject _enemy;
	// Use this for initialization
	void Start ()
	{
		
	}
	
	// Update is called once per frame
	void Update ()
	{
		if (_enemy == null) {
			_enemy = Instantiate<GameObject> (enemyPrefeb);
			_enemy.transform.position = new Vector3 (0, 1, 0);
			float angle = Random.Range (0, 360);
			_enemy.transform.Rotate (0, angle, 0);
		}
	}
}
